package com.ldk.framework.enums;

/**
 * 快递订单状态枚举
 * @author xiangwl
 * 2017年2月24日
 * com.ldk.framework.enums
 * ExpressOrderStatus
 */
public enum ExpressOrderStatus {
	/**
	 * 发布
	 */
	Publish("发布",1),
	/**
	 * 接单
	 */
	Receive("接单",2),
	/**
	 * 拒单
	 */
	Refuse("拒单",4),
	/**
	 * 完成
	 */
	Complete("完成",8)
	;
	private ExpressOrderStatus(String name, int value){
		this.name = name;
		this.value = value;
	}
	private String name;
	private int    value;
	public String getName() {
		return name;
	}
	public int getValue() {
		return value;
	}
	
	public static String getStatusName(int value){
		if(value == ExpressOrderStatus.Publish.getValue())
			return ExpressOrderStatus.Publish.getName();
		else if(value == ExpressOrderStatus.Receive.getValue())
			return ExpressOrderStatus.Receive.getName();
		else if(value == ExpressOrderStatus.Refuse.getValue())
			return ExpressOrderStatus.Refuse.getName();
		else if(value == ExpressOrderStatus.Complete.getValue())
			return ExpressOrderStatus.Complete.getName();
		return "";
	}
}
